/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package testingapplication;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;

/**
 *
 * @author TruongHoangLe
 */
public class TestingApplication {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        Set<String> listOne = new HashSet<>();
        Set<String> listTwo = new HashSet<>();
        String one = "one";
        String two = "two";
        String three = "three";
        String four = "four";
        listOne.add(one);
        listOne.add(three);
        listTwo.add(one);
        listTwo.add(two);
        listTwo.add(four);
        for (String listOne1 : listOne) {
            System.out.println(listOne1);
        }
        System.out.println("==============================");
        for (String listOne1 : listTwo) {
            System.out.println(listOne1);
        }
        Set<String> newList = new HashSet<>();
        newList.addAll(listOne);
        newList.addAll(listTwo);
        System.out.println("==============================");
        for (String listOne1 : newList) {
            System.out.println(listOne1);
        }
    }
}
